翻訳と辞書
Words near each other
・ Functional Skills Qualification
・ Functional software architecture
・ Functional sourcing
・ Functional specialization (brain)
・ Functional specification
・ Functional spinal unit
・ Functional square root
・ Functional Strategy
・ Function object
・ Function of a real variable
・ Function of several real variables
・ Function overloading
・ Function point
・ Function pointer
・ Function problem
Function prologue
・ Function prototype
・ Function representation
・ Function series
・ Function space
・ Function test
・ Function tree
・ Function type
・ Function value
・ Function word
・ Function-Behaviour-Structure ontology
・ Function-level programming
・ Function-spacer-lipid construct
・ Functional
・ Functional (C++)


Dictionary Lists
翻訳と辞書 辞書検索 [ 開発暫定版 ]
スポンサード リンク

Function prologue : ウィキペディア英語版
Function prologue
In assembly language programming, the function prologue is a few lines of code at the beginning of a function, which prepare the stack and registers for use within the function. Similarly, the function epilogue appears at the end of the function, and restores the stack and registers to the state they were in before the function was called.
The prologue and epilogue are not a part of the assembly language itself; they represent a convention used by assembly language programmers, and compilers of many higher-level languages. They are fairly rigid, having the same form in each function.
Sometimes, function prologue and epilogue contain also buffer overflow protection code.
==Prologue==
A function prologue typically does the following actions if the architecture has a base pointer (also known as frame pointer) and a stack pointer (the following actions may not be applicable to those architectures that are missing a base pointer or stack pointer) :
*Pushes the old base pointer onto the stack, such that it can be restored later (by getting the new base pointer value which is set in the next step and is always pointed to this location).
*Assigns the value of stack pointer (which is pointed to the saved base pointer and the top of the old stack frame) into base pointer such that a new stack frame will be created on top of the old stack frame (i.e. the top of the old stack frame will become the base of the new stack frame).
*Moves the stack pointer further by decreasing or increasing its value, depending on whether the stack grows down or up. On x86, the stack pointer is decreased to make room for variables (i.e. the function's local variables).
Several possible prologues can be written, resulting in slightly different stack configuration. These differences are acceptable, as long as the programmer or compiler uses the stack in the correct way inside the function.
As an example, here′s a typical IA-32 assembly language function prologue as produced by the GCC (note that the AT&T (gcc/gas) syntax for move is movl src, dst):


抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)
ウィキペディアで「Function prologue」の詳細全文を読む



スポンサード リンク
翻訳と辞書 : 翻訳のためのインターネットリソース

Copyright(C) kotoba.ne.jp 1997-2016. All Rights Reserved.